package com.lu.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 品牌
 * </p>
 *
 * @author currentCodeAuthor
 * @since 2022-07-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysBrand extends Model<SysBrand> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 品牌名称
     */
    private String name;

    /**
     * logo
     */
    private String logo;

    /**
     * 状态 0禁用 1启用
     * @see com.lu.model.enums.YesOrNoEnum
     */
    private Integer status;

    /**
     * 电子券折扣 value/100 
     */
    private Integer electronicCouponDiscount;

    /**
     * 简介
     */
    private String description;

    /**
     * 创建人
     */
    private Long createUserId;

    /**
     * 更新人
     */
    private Long updateUserId;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    /**
     * 商户数量
     */
    @TableField(exist = false)
    private Integer merchantCount;
    /**
     * 门店数量
     */
    @TableField(exist = false)
    private Integer storeCount;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
